package chixing.day09.homework.work5;

import chixing.day09.homework.work5.ClothingProduct;
import chixing.day09.homework.work5.ElectronicProduct;
import chixing.day09.homework.work5.Product;
import chixing.day09.homework.work5.ProductUtils;

public class ProductTest {
    public static void main(String[] args) {
        Product p1 = new ElectronicProduct("101","电脑",5000f);
        Product p2 = new ElectronicProduct("102","手机",2000f);
        Product p3 = new ElectronicProduct("103","平板",3000f);
        Product p4 = new ElectronicProduct("104","手表",200f);

        Product p5 = new ClothingProduct("201","短袖",70f);
        Product p6 = new ClothingProduct("202","短裤",110f);
        Product p7 = new ClothingProduct("203","鞋子",200f);
        Product p8 = new ClothingProduct("204","冲锋衣",250f);
        Product p9 = new ClothingProduct("205","羽绒服",300f);

        //p1,p2,p3,p4,p5,p6,p7,p8,p9
        Product[] products = {p1,p2,p3,p4,p5,p6,p7,p8,p9};
        ProductUtils productUtils = new ProductUtils();
        System.out.println(productUtils.getSumPrice(products));

    }
}
